// pages/physical-service/physical-service.js
Page({
	data: {
		patientName: '',
		selectedPackage: null
	},

	onLoad(options) {
		console.log('体检服务页面加载')
		console.log('页面参数:', options)
		
		if (options.patient) {
			this.setData({
				patientName: options.patient
			})
		}
	},

	selectPackage(e) {
		const packageType = e.currentTarget.dataset.package
		console.log('选择了体检套餐:', packageType)
		
		// 跳转到体检预约页面
		wx.navigateTo({
			url: '/pages/physical-appointment/physical-appointment?patient=' + this.data.patientName + '&package=' + packageType
		})
	},

	getPackageName(packageType) {
		const packageNames = {
			'basic': '基础体检套餐',
			'comprehensive': '全面体检套餐',
			'premium': '高级体检套餐'
		}
		return packageNames[packageType] || '体检套餐'
	}
})
